package cn.zkrt.iotms.module.iot.dao;

import cn.zkrt.iotms.module.iot.dto.DeviceBPageDto;
import cn.zkrt.iotms.module.iot.entity.DeviceB;
import cn.zkrt.iotms.module.iot.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 设备(DeviceB)表数据库访问层
 *
 * @author xulinyu
 * @since 2024-10-06 16:26:30
 */
public interface DeviceBDao extends BaseMapper<DeviceB> {

    Page<DeviceBVO> queryByPage(Page<DeviceBVO> page,@Param("deviceName") String deviceName);

    DeviceCategoryTotalVO categoryTotal(@Param("stcd") String stcd,@Param("CJ") String cj,@Param("YC") String yc);

    /**
     *
     * @param page
     * @param dto
     * @param cj 车间
     * @param yc 鱼池
     * @return
     */
    Page<DeviceBPageVO> sfsPage(Page<DeviceBPageVO> page,@Param("dto") DeviceBPageDto dto,@Param("CJ")String cj,@Param("YC")String yc);

    List<UnbindDeviceVO> unbindList(String stcd);

    Boolean unbind(String deviceId);

    List<BindingDeviceVO.BindingDevice> bindingList(String stcd);
}

